﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%
    if (Request.IsAuthenticated) {
%>
        <h2>Bienvenido <b><%= Html.Encode(Page.User.Identity.Name) %></b>!</h2>
        <p class="forgot-password">[ <%= Html.ActionLink("Log Off", "LogOff", "Account") %> ]</p>
<%
    }
    else {
%> 
        <% using (Html.BeginForm("LogOn", "Account", FormMethod.Post))
           { %>
            <h2 class="first">Login</h2>
            <label for="username">Nombre de usuario</label>
            <%= Html.TextBox("username", "", new { Class = "input-box" }) %>
            <label for="password">Password</label>
            <%= Html.Password("password", "", new { Class = "input-box" })%>
            <%= Html.ValidationMessage("password") %>
            <%= Html.CheckBox("rememberMe") %> <label class="inline" for="rememberMe">¿Recordarme?</label>
            <input class="button" name="Login" type="submit" value="Login" />
        <%  
            }
        %>
        <p class="forgot-password"><a href="#">¿Olvidaste tu clave?</a></p>
<%
    }
%>
